package com.joymart.admin.rest;


import com.joymart.common.system.rest.authority.RestAuthority;
import com.joymart.common.system.rest.authority.RestAuthorityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class RestAuthorityController {

    @Autowired
    private RestAuthorityService restAuthorityService;

    @GetMapping("/admin/restAuthorities")
    public List<RestAuthority> getAllAuthority(){
        return restAuthorityService.findAll();
    }


}
